Repository navigation
document the delete organization sub account endpoint - #56
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
846986b to
bb831d1
Compare
| A repeated call for the same sub account returns `404`, because a sub account that is already | ||
| scheduled for deletion is no longer listed. | ||
|
|
||
| Rate limit: 10 requests per minute per organization. |
There was a problem hiding this comment.
Is there specific rate limiting in this case?
There was a problem hiding this comment.
yes, there is one for this endpoint
Organization Access Only users and organization API tokens can list, create and delete sub accounts too, so the list, create and delete descriptions name both permissions.
Organization Access Only can't be granted to customers yet, so the list, create and delete descriptions name only the permissions they can hold today.
Motivation
Sub-accounts can now be deleted from the organization panel, and the same action is exposed over
the public API.
DELETE /api/organizations/{organization_id}/sub_accounts/{sub_account_id}is notdescribed in the spec yet, so it is missing from the rendered reference.
Changes
deleteOrganizationSubAccount: newdeleteoperation on/api/organizations/{organization_id}/sub_accounts/{sub_account_id}, tagged Organizations,reusing the existing
organization_idparameter and adding a sharedsub_account_idoneorganization's
organization_idor the Organization & Sub-accounts feature turned off,404 on an unknown, already deleted or other organization's sub-account,
409 when a deletion for the same sub-account is already running, 429 over the rate limit of
10 requests per minute per organization
deleting the organization's last sub-account also deletes the organization
operation; the SDK methods land in the companion PRs below
RateLimitExceededResponseschema andLIMIT_EXCEEDEDresponse for the 429, which thespec had no shared definition for
management permissions are not enough
How to test
organization_idandsub_account_idpath params, cURL / Node.js / PHP / Python / Ruby /.NET / Java samples, and 204/401/403/404/409/429 responses
{"errors": "Rate limit exceeded"}DELETE /api/organizations/:organization_id/sub_accounts/:idwitha token holding Organization & Sub-accounts Admin returns 204 and the sub-account is gone
from
GET /api/organizations/:organization_id/sub_accountsDELETEon another sub-account with a token holding Sub-accounts Creation & ListingAdmin returns 403, and the sub-account is still listed
DELETEwith a sub-account id from another organization returns 404DELETEfor the same sub-account while the first one is still in flight returns 409with
{"errors": "Another action in progress. Wait until it's finished"}Companion PRs
Deleteshipped in v0.4.0)